Skip to content

fix: ensure GraphConfig.root_dir is an absolute path #673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 10, 2025

Conversation

bhearsum
Copy link
Contributor

@bhearsum bhearsum commented Apr 7, 2025

No description provided.

@@ -157,6 +157,9 @@ def validate_graph_config(config):


def load_graph_config(root_dir):
# ensure we have an absolute path; this is required for assumptions
# made later, such as the `vcs_root` being a directory above `root_dir`
root_dir = os.path.abspath(root_dir)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory, I think this should go in the __post_init__ method of GraphConfig. In practice, I don't think it really matters. Given GraphConfig is frozen, it would mean we'd need to use object.__setattr__ to set it, so this is probably fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah; but if there's ever anything else that creates a GraphConfig that could be a problem, I think? This seems like an easy change to make.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bhearsum
Copy link
Contributor Author

failures are codecov (meh) and pre-commit (issue on their side).

@bhearsum bhearsum merged commit df291c6 into taskcluster:main Apr 10, 2025
15 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants